/**
 * 子弹类型接口
 */
export interface BulletType {
  id: number
  code: string
  name: string
  item_count: number
  image_url: string
}

/**
 * 价格历史记录
 */
export interface PriceHistory {
  price: number
  timestamp: string
}

/**
 * 周期性模式
 */
export interface WeeklyPattern {
  mon: number
  tue: number
  wed: number
  thu: number
  fri: number
  sat: number
  sun: number
}

/**
 * 相关物品趋势
 */
export interface RelatedItemsTrend {
  gun_avg_price: number
  gun_change_percent: number
  accessory_avg_price: number
  accessory_change_percent: number
  material_avg_price: number
  material_change_percent: number
}

/**
 * 趋势可靠性
 */
export interface TrendReliability {
  data_points: number
  stability: number
  consistency: number
  overall: number
}

/**
 * 未来价格预测
 */
export interface FuturePrediction {
  days: number
  price: number
  change_percent: number
  date: string
}

/**
 * 目标价格
 */
export interface TargetPrice {
  price: number
  days: number
  date: string
  change_percent: number
}

/**
 * 分析数据
 */
export interface AnalysisData {
  max_price: number
  min_price: number
  price_range: number
  last_30_days_avg: number
  last_60_days_avg: number
  last_90_days_avg: number
  avg_change_rate: number
  support_level: number
  resistance_level: number
  seasonality: string
  trend_reliability: TrendReliability
  daily_change_rate: number
  future_predictions: Record<number, FuturePrediction>
  target_prices: TargetPrice[]
}

/**
 * 子弹价格预测项
 */
export interface BulletPredictItem {
  id: string
  name: string
  image_url: string
  grade: number
  bullet_type: string
  bullet_code: string
  current_price: number
  update_time: string
  predict_price: number
  price_volatility: number
  trend_strength: 'strong' | 'weak' | 'unknown'
  trend: 'up' | 'down' | 'stable'
  confidence: 'high' | 'medium' | 'low'
  price_history: PriceHistory[]
  weekly_pattern: WeeklyPattern
  related_items_trend: RelatedItemsTrend
  linkage_direction: string
  linkage_strength: number
  analysis: AnalysisData
}

/**
 * API响应接口
 */
export interface BulletPredictResponse {
  code: number
  message: string
  data: BulletPredictItem[]
}
